<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'timingTask.label', default: 'TimingTask')}"/>
    <title>编辑定时任务</title>
</head>

<body>

<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>编辑定时任务</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link controller="timingTask" action="index">定时任务列表</g:link>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">编辑定时任务</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <g:if test="${flash.message}">
                <div class="message" role="status">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${this.timingTask}">
                <ul class="errors" timingTask="alert">
                    <g:eachError bean="${this.timingTask}" var="error">
                        <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                            <g:message error="${error}"/>
                        </li>
                    </g:eachError>
                </ul>
            </g:hasErrors>
        <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>编辑定时任务</h5>

                    <div class="card-header-right">

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <g:form resource="${this.timingTask}" method="PUT">


                        <div class="form-group row">
                            <label class="col-md-3 control-label">组件</label>

                            <div class="col-md-4">
                                <g:select class="form-control" name="component.id" id="component"
                                          value="${this.timingTask?.component?.id}"
                                          from="${com.next.Component.findAllByActive(true)}" optionKey="id"
                                          optionValue="name" noSelection="['': '请选择']"></g:select>

                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>

                        <div class="form-group row">
                            <label class="col-md-3 control-label">周期</label>

                            <div class="col-md-4">
                                <g:select class="form-control" name="duration" id="duration"
                                          value="${this.timingTask?.duration}"
                                          from="${this.timingTask.constrainedProperties.duration.inList}"></g:select>

                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>

                        <div class="form-group row">
                            <div class="col-md-12">
                                <button class="submitBtn btn btn-info" type="submit">保存</button>
                            </div>
                        </div>
                    </g:form>

                </div>
                <!-- Hover table card end -->
            </div>

            <!-- Page-body end -->
        </div>
    </div>
</div>

</body>

</html>


